﻿using Sustainalytics.DataLayer.ConnectionStrings;
using Sustainalytics.Entities.ConnectionStrings;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Sustainalytics.Governance.Reporting.ProfileTest
{
    

    class Program
    {
        private static ReportsManager _reportsManager;
        private static string _clientPlatformConnectionString;

        static void Main(string[] args)
        {
            //connectionStrings = new Dictionary<string, string>
            //{
            //    {"GovernanceDW", "mongodb://localhost:27017/GovernanceDW_A"},
            //    {"GovernanceCompanyReportPDF", "mongodb://localhost:27017/GovernanceCompanyReportPDF_A"},
            //    {"GovernanceInputFile", "mongodb://localhost:27017/GovernanceInputFile"}
            //};

            //var connectionStrings = new Dictionary<string, string>
            //{
            //    {"GovernanceDW", dwConnectionString.Replace("10.12.7.71", "54.72.160.155")},
            //    {"GovernanceCompanyReportPDF", companyReportConnectionString.Replace("10.12.7.71", "54.72.160.155")},
            //    {"GovernanceInputFile", inputFilesConnectionString}
            //};

            var connectionStrings = new Dictionary<string, string>
            {
                {"GovernanceDW", "mongodb://54.72.160.155:27017/GovernanceDW_A"},
                {"GovernanceInputFile", "mongodb://54.72.160.155:27017/GovernanceInputFile"}
            };


            _reportsManager = ReportsManager.GetInstance(100, connectionStrings, "A");
            //if (ConfigurationManager.AppSettings["ReportsSavePath"] != null)
            //{
            //    _reportsManager.ReportsSavePath = ConfigurationManager.AppSettings["ReportsSavePath"];
            //}

            //_reportsManager.GenerateBulkPdfReports();
            _reportsManager.GeneratePdfReport(new Guid("b0e0cb97-fc7a-4b35-ab01-c83c790a600c"));
            _reportsManager.GeneratePdfReport(new Guid("073abb19-8aeb-4b75-8a0a-8c72c16196b7"));

            //Console.WriteLine("Press any key to close.");
            //Console.ReadLine();
        }

    }
}
